package com.wolfcode.customer.service.impl;

import java.util.List;

import com.wolfcode.common.utils.DateUtils;
import com.wolfcode.common.utils.SecurityUtils;
import com.wolfcode.customer.domain.info.OperatorInfo;
import com.wolfcode.customer.domain.vo.BusCustomerInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wolfcode.customer.mapper.BusCustomerInfoMapper;
import com.wolfcode.customer.domain.BusCustomerInfo;
import com.wolfcode.customer.service.IBusCustomerInfoService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author wolfcode
 * @date 2022-12-08
 */
@Service
public class BusCustomerInfoServiceImpl implements IBusCustomerInfoService
{
    @Autowired
    private BusCustomerInfoMapper busCustomerInfoMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public BusCustomerInfo selectBusCustomerInfoById(Long id)
    {
        return busCustomerInfoMapper.selectBusCustomerInfoById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param busCustomerInfoVo 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<BusCustomerInfo> selectBusCustomerInfoList(BusCustomerInfoVo busCustomerInfoVo)
    {
        return busCustomerInfoMapper.selectBusCustomerInfoList(busCustomerInfoVo);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param busCustomerInfo 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertBusCustomerInfo(BusCustomerInfo busCustomerInfo)
    {
        String username = SecurityUtils.getUsername();
        busCustomerInfo.setOperator(username);
        busCustomerInfo.setInputTime(DateUtils.getNowDate());
        return busCustomerInfoMapper.insertBusCustomerInfo(busCustomerInfo);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param busCustomerInfo 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateBusCustomerInfo(BusCustomerInfo busCustomerInfo)
    {
        return busCustomerInfoMapper.updateBusCustomerInfo(busCustomerInfo);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteBusCustomerInfoByIds(Long[] ids)
    {
        return busCustomerInfoMapper.deleteBusCustomerInfoByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteBusCustomerInfoById(Long id)
    {
        return busCustomerInfoMapper.deleteBusCustomerInfoById(id);
    }

    /**
     * 获取所有user
     * */
    @Override
    public List<OperatorInfo> getOperateList() {
        return busCustomerInfoMapper.getOperateList();
    }
}
